home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 / Aminet - June 1993 [Walnut Creek].iso / usenet / sources / volume90 / unix / ls_4_0k / part01 next >
Encoding:
Internet Message Format  |  1990-07-03  |  57.1 KB

  1. Path: xanth!cs.odu.edu!Amiga-Request
  2. From: Amiga-Request@cs.odu.edu (Amiga Sources/Binaries Moderator)
  3. Newsgroups: comp.sources.amiga
  4. Subject: v90i195: ls 4.0k - yet another unix-like ls command, Part01/04
  5. Message-ID: <13039@xanth.cs.odu.edu>
  6. Date: 3 Jul 90 19:22:41 GMT
  7. Sender: tadguy@cs.odu.edu
  8. Reply-To: kim@uts.amdahl.com (Kim E. DeVaughn)
  9. Lines: 1534
  10. Approved: tadguy@cs.odu.edu (Tad Guy)
  11. X-Mail-Submissions-To: Amiga@cs.odu.edu
  12. X-Post-Discussions-To: comp.sys.amiga
  13.  
  14. Submitted-by: kim@uts.amdahl.com (Kim E. DeVaughn)
  15. Posting-number: Volume 90, Issue 195
  16. Archive-name: unix/ls-4.0k/part01
  17.  
  18. [ uuencoded executable and object enclosed.  ...tad ]
  19. [ the file ls.c was split for posting.  ...tad ]
  20.  
  21. I've reworked Justin McCormick's "ls" (v3.1) so it's output and
  22. option flags (where applicable) are much closer to UNIX's implementation, by
  23. default.  It still isn't a "perfect" emulation, but it's quite close.
  24.  
  25. Along the way, I've fixed a number of bugs (none terribly major), added some
  26. additional features, and just about run out of letters for the option flags!
  27.  
  28. If Justin thought "ls" was getting bloated with options in his most recent
  29. rev (v3.1), he'll surely gag after seeing what I've done :-).  Still, with
  30. all the new options, etc, "ls" is only about 16K.  And it can still be made
  31. resident, etc.    In fact, with the right set of switches, you can make it
  32. behave just like v3.1 (bug fixes excepted) if you want!
  33.  
  34. #!/bin/sh
  35. # This is a shell archive.  Remove anything before this line, then unpack
  36. # it by saving it into a file and typing "sh file".  To overwrite existing
  37. # files, type "sh file -c".  You can also feed this as standard input via
  38. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  39. # will see the following message at the end:
  40. #        "End of archive 1 (of 4)."
  41. # Contents:  License README README.1ST ls.doc src src/Linkfile
  42. #   src/Makefile src/ls.h src/mycres.a src/mycres.o.uu
  43. # Wrapped by tadguy@xanth on Tue Jul  3 15:22:09 1990
  44. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  45. if test -f 'License' -a "${1}" != "-c" ; then 
  46.   echo shar: Will not clobber existing file \"'License'\"
  47. else
  48. echo shar: Extracting \"'License'\" \(2444 characters\)
  49. sed "s/^X//" >'License' <<'END_OF_FILE'
  50. XLicense                               05/11/90
  51. X
  52. Xls v4.0k is (c) Copyright 1990, Kim E. DeVaughn, all rights reserved.
  53. X
  54. XAny possesor of this version (v4.0k) of "ls" for the Amiga is hereby granted
  55. Xa non-exclusive license permitting its use and/or redistribution, subject to
  56. Xthe following terms and conditions.
  57. X
  58. XPermission is hereby granted to freely redistribute this version of "ls" via
  59. Xelectronic bulletin board systems (BBS's), freely redistributable disk
  60. Xcollections (such as provided by Fred Fish), service bureaus (BiX, GEnie,
  61. XCompuServe, etc), and networks such as USENET, BITNET, and Internet, provided
  62. Xthat such distribution includes this unmodified License, and all of the
  63. Xdocumentation files (README and .doc files), in addition to the executable,
  64. Xand with all copyright notices intact.    Access to the source code must also
  65. Xbe available and allowed.
  66. X
  67. XUse of the "ls" executable and docmentation in any environment, commercial or
  68. Xotherwise is not restricted, and no fee shall be required for said use.  The
  69. Xuse of the source code is also permitted in other freely redistributable works,
  70. Xprovided proper acknowledgement of the authors is given.  The use of the source
  71. Xcode in a commercial product is prohibited without prior written permission
  72. Xof the author.
  73. X
  74. XWithout prior written permission from the author, it is prohibited to sell or
  75. Xotherwise convey this version of "ls" for monetary or other forms of compen-
  76. Xsation, other than the customery service and/or duplication fees as may be
  77. Xcharged by the distribution mechanisms identified above.
  78. X
  79. XIt is further prohibited, without prior written permission from the author,
  80. Xto include this version of "ls" in whole or in part, in the distribution of
  81. Xany commercial hardware or software package, or component thereof.
  82. X
  83. XThis version of "ls" is provided "as is", without express or implied warranty.
  84. XThe author makes no claim or representation about the suitability of this
  85. Xsoftware for any purpose.
  86. X
  87. XThe author disclaims any and all warranties with regard to this software,
  88. Xincluding all implied warranties of merchantability and fitness.  In no event
  89. Xshall the author be liable for any special, indirect, or consequential
  90. Xdamages, or any damages whatsoever resulting from loss of use, data, or
  91. Xprofits, whether in an action of contract, negligence, or other tortious
  92. Xaction, arising out of or in connection with the use or performance of this
  93. Xsoftware.
  94. X
  95. XKim E. DeVaughn
  96. X750 Sylvan Av,    #32
  97. XMt. View, CA  94041
  98. END_OF_FILE
  99. if test 2444 -ne `wc -c <'License'`; then
  100.     echo shar: \"'License'\" unpacked with wrong size!
  101. fi
  102. # end of 'License'
  103. fi
  104. if test -f 'README' -a "${1}" != "-c" ; then 
  105.   echo shar: Will not clobber existing file \"'README'\"
  106. else
  107. echo shar: Extracting \"'README'\" \(15901 characters\)
  108. sed "s/^X//" >'README' <<'END_OF_FILE'
  109. XREADME                  ls v4.0k                  05/11/90
  110. X
  111. Xls v4.0k is (c) Copyright 1990, Kim E. DeVaughn, all rights reserved.
  112. X
  113. X
  114. XIntroduction:
  115. X
  116. XWhat?!    Another version of "ls" ...?  Why in the world does the world need
  117. XYet Another Version of such a common command?  Actually, that's the answer
  118. X(as well as the question).
  119. X
  120. XIf you kept track of such things (like some operating systems do), you'd
  121. Xprobably find the "most executed" command is by far, "ls" (or dir, etc).
  122. X
  123. XWe use "ls" not only to see what's where, but when what's there got there,
  124. Xhow big it is, what it's attributes are, etc.  We also use "ls" to check our
  125. Xspelling, make lists of files, and so forth.
  126. X
  127. XBecause of this high usage, we'd like it to work the way we think it ought
  128. Xto, or at least the way we're used to.  For alot of people, this means
  129. X"like UNIX(R)".*   Not that the UNIX way is the *best* way, but when you have
  130. Xto deal with UNIX at work, etc, it makes it much more convenient and prod-
  131. Xuctive (not to mention much less error prone), to have the Amiga environment
  132. X"similar".  At least in the CLI/shell environment.
  133. X
  134. X           * - UNIX is a registered trademark of AT&T, if you didn't know.
  135. X
  136. XTo that end, I've reworked Justin McCormick's "ls" (v3.1) so it's output and
  137. Xoption flags (where applicable) are much closer to UNIX's implementation, by
  138. Xdefault.  It still isn't a "perfect" emulation, but it's quite close.
  139. X
  140. XAlong the way, I've fixed a number of bugs (none terribly major), added some
  141. Xadditional features, and just about run out of letters for the option flags!
  142. X
  143. XIf Justin thought "ls" was getting bloated with options in his most recent
  144. Xrev (v3.1), he'll surely gag after seeing what I've done :-).  Still, with
  145. Xall the new options, etc, "ls" is only about 16K.  And it can still be made
  146. Xresident, etc.    In fact, with the right set of switches, you can make it
  147. Xbehave just like v3.1 (bug fixes excepted) if you want!
  148. X
  149. XThe reason for this is that I'm a very firm believer in letting people "have
  150. Xit their way".  I'm sure I could chop out about 4K or more if I just did it
  151. X"my way", but other people have other ideas.  The default way however, *is*
  152. X"my way" ... or actually "the UNIX way".
  153. X
  154. X    [ BTW ... if you want this version of "ls" to look/work like v3.1, the ]
  155. X    [ following switches will do it for you:  -AMSWbemoqv  ... :-)       ]
  156. X
  157. X
  158. X
  159. XInstallation:
  160. X
  161. XJust copy "ls" to a directory in your path.  If the "p" (pure) bit has been
  162. Xstripped of somewhere along the way, you can turn it on using the Protect
  163. Xcommand (or chmod, etc) if you want to make "ls" a "resident" command.
  164. X
  165. X
  166. X
  167. XDistribution:
  168. X
  169. XHere is a listing of what you should have received in this distribution:
  170. X
  171. X-----rw-d    7     2444  May 10 18:23  License
  172. X-----rw-d      33    15901  Jun  5 11:31  README
  173. X-----rw-d    4     1204  Jun  5 11:09  README.1ST
  174. X---p-rwxd      34    16028  May 11 02:13  ls
  175. X-----rw-d      43    20124  May 11 09:46  ls.doc
  176. Xd----rwxd    1     0  Jun  5 10:35  src
  177. XDirs: 1    Files: 5    Blocks: 122   Bytes: 54949
  178. X
  179. Xsrc:
  180. X-----rw-d    2      457  May 10 19:07  Linkfile
  181. X-----rw-d    3      590  May 10 18:52  Makefile
  182. X-----rw-d     137    65576  May 11 02:02  ls.c
  183. X-----rw-d    9     3685  May 10 18:53  ls.h
  184. X-----rw-d      73    34948  May 10 18:51  lssup.a
  185. X-----rw-d      12     5160  Jul 29  1989  mycres.a
  186. X-----rw-d    4     1104  Jul 29  1989  mycres.o
  187. XDirs: 0    Files: 7    Blocks: 240   Bytes: 111520
  188. X
  189. XTotals:
  190. XDirs: 1    Files: 12    Blocks: 362   Bytes: 166469
  191. X
  192. X
  193. X
  194. XWhat's New  (see "ls.doc" for details, etc):
  195. X
  196. X    o  New (default) long listing format that *looks* like UNIX's (except for
  197. X       things like owner, group ID, etc).
  198. X
  199. X    o  Block sizes now include *all* blocks associated with a file, and are
  200. X       finally accurate for FFS devices.
  201. X
  202. X    o  By default, upper/lower case *is* significant in the output listing,
  203. X       and in the wildcard pattern matching.
  204. X
  205. X    o  By default, directories and files are intermixed, according to their
  206. X       alphabetic position.
  207. X
  208. X    o  By default, the short listing format uses fixed width columns, based
  209. X       on the length of the longest filename in the directory.    Variable
  210. X       width columns are still available.
  211. X
  212. X    o  By default, "hidden", "*.info", and "dot" files (eg, .foo) are not
  213. X       displayed.  There are switches for each, as well as an "all" flag.
  214. X
  215. X    o  Several new options like the ability to limit the "-R" recursion depth;
  216. X       ability to show absolute and relative path names in the long format
  217. X       listing;  additional control of directory header and totalization
  218. X       lines;  elimination of redundent totalization lines;  showing/sorting
  219. X       on files' "disk keys";  control of the date format;  sort by date/size
  220. X       defaults to newest/biggest first;  and a few other things.
  221. X
  222. X    o  Improved error handling and error msgs.    Better "break" handling.  No
  223. X       more "memory leaks" (yes, there is one in v3.1 ... it looses 300 bytes
  224. X       on an error exit).
  225. X
  226. X    o  The assignment of option flags has been "rationalized".  Applicable
  227. X       flags from the UNIX "ls" were assigned 1st, followed by other flags
  228. X       from v3.1, followed by new flags added in this rev.  However ... some
  229. X       flag assignments from previous revs were changed when better mnemonic
  230. X       values could be found, etc.   So ... check the usage, and/or docs.
  231. X       Caveat emptor!
  232. X
  233. X    o  Flags requiring arguments (eg, -N) may or may not be seperated from
  234. X       the argument by spaces.    So, "-Nfoo" is just as legal as "-N  foo".
  235. X
  236. X
  237. X
  238. XWhat's Not (yet) Done ... and Limitations/Caveats:
  239. X
  240. X    o  Wildcard expansion is still done by "ls", rather than left to the shell
  241. X       to do so (which is where it should be done, IMHO).  This is to avoid
  242. X       the braindead limitation of being able to pass a command line of only
  243. X       255 chars or so max to Exec() under AmigaOS 1.3.  Hopefully this limit
  244. X       will be removed under AmigaOS 2.0.
  245. X
  246. X       This also means that if the shell you're using expands normal wildcards
  247. X       ("*" and "?") itself, you need to "quote" the wildcards in some manner
  248. X       for "ls" to work as intended.  Depending on the shell you use, things
  249. X       like "*" or \* or '* may work.  See your shell documentation.
  250. X
  251. X    o  Each "fully named path" is still processed seperately, and will give
  252. X       you an automatic "long format list" for each file encountered, or a
  253. X       "short format list" for each subdirectory encountered.  This is why
  254. X       you will get some rather weird output listings if you let your shell
  255. X       expand wildcards, rather than passing the wildcards intact to "ls".
  256. X       (A "fully named path" is a filespec that contains no wildcards ... in
  257. X       other words, an actual file or dir name).
  258. X
  259. X       This will change.  How it wiil change is somewhat dependent on what is
  260. X       done in AmigaOS 2.0 with command line length limits, links, etc.
  261. X
  262. X    o  Many flag settings get reset to the default values between each "fully
  263. X       named path".  Some do not, and are identified in "ls.doc" as being
  264. X       "sticky".
  265. X
  266. X       This will change when the "fully named path" and wildcard expansion
  267. X       issues are resolved.
  268. X
  269. X    o  Doesn't support AmigaOS v2.0 links (or any other 2.0 enhancements),
  270. X       since CBM hasn't finalized it (besides, I don't have 2.0 yet).
  271. X
  272. X    o  I want to allow the user to override the default operation with flags
  273. X       provided in environment variables.  This will require reworking "ls's"
  274. X       startup code (or the use of the standard "cres", with accompanying
  275. X       bloat of the executable) due to the current env var implementation as
  276. X       files.  Dumb.
  277. X
  278. X    o  The filename arguments required for the -N and -O options must be fully
  279. X       specified.  Wildcards don't work here.
  280. X
  281. X    o  The -N and -O options accept only filenames; they do not accept actual
  282. X       dates.
  283. X
  284. X    o  You must hit "return" to clear the short format's builtin pager's
  285. X       "More ..." line (see -I), and continue with the listing.  I'd like to
  286. X       change this to being able to hit any key.
  287. X
  288. X       Also, the builtin pager works only on a directory-by-directory basis.
  289. X       It'd be nice (read: this probably won't happen) if it worked on the
  290. X       output as a whole.  And if it worked with the long format listing.
  291. X
  292. X    o  When a long format listing is requested of a "psuedo-device", the
  293. X       block count may be inaccurate, since such "devices" do not necessarily
  294. X       have an inherent (or constant) bytes/block value.  Currently, the only
  295. X       such case known are assignments made with the "pathass" utility.  When
  296. X       this situation occurs, a warning message is issued to the effect that
  297. X       the block counts may be inaccurate.
  298. X
  299. X
  300. X
  301. XKnown Bugs:
  302. X
  303. X    o  Multiple wildcards in a given path do not work properly.  For example,
  304. X       the command: "ls ls*/*.o"  lists the entire contents of the "ls40"
  305. X       subdirectory, not just the ".o" files.
  306. X
  307. X    o  Certain options are slightly incompatible.  The known instances occur
  308. X       with the old (v3.1) long format, and the variable column form of the
  309. X       short format, as I didn't touch that code much.  Known instances are:
  310. X
  311. X       Show keys (-K) does not work with the old (-o) long format.
  312. X
  313. X       Append "/" to dir names (-p) does not work with the variable
  314. X       column short format (-vp will NOT append a "/").  However, if no
  315. X       ANSI escape sequences (-E) is specified along with -v, they will
  316. X       be appended to dir names.  This is the same behavior as "ls" v3.1.
  317. X
  318. X    o  Seperate subdir totalization for "fully named path" entries does not
  319. X       work.  However, their contribution to a grand total (-T) is included.
  320. X
  321. X
  322. X
  323. XQuick Look:
  324. X
  325. Xusage: ls [ [-options <args>]  [names] ] ...
  326. X  a  Show dot files      s  Sort by size        M  Ignore case w/wildcard
  327. X  b  Show data blks      t  Sort by date        N <name> Show newer than
  328. X  c  Show filenotes      u  Usage  [also -?]        O <name> Show older than
  329. X  d  Show dirs only      v  Vari col short list    P  Show full pathnames
  330. X  e  Execute bit is "e"   x <pat> Exclude files     Q  Requesters enabled
  331. X  f  Show files only      z  Override blk calc        R  Recursive listing
  332. X  h  Show hidden files      A  Show all  [= -ahi]     S  Show dirs first
  333. X  i  Show *.info files      B <blk> Force blk size    T  Totals for all entries
  334. X  k  Sort by disk key      C  Single column list     V  Show rel pathnames
  335. X  l  Long listing      D  Show dirs last        W  No contents (wild dir)
  336. X  m  Mixed case output      E  No ANSI escape codes   X <wide> Set output cols
  337. X  n  No sort          G  No subdir totals        Y <high> Set output rows
  338. X  o  Old long list fmt      H  No headings        Z  Force ANSI sequences
  339. X  p  Append "/" to dirs   I  No page prompts       0-6 Date format (new long)
  340. X  q  Quit on not found      K  Show disk keys        -  Next arg is filename
  341. X  r  Reverse sort      L <n> Limited recursion
  342. X  F <format> Format output [-o fmt] (default: "%p %d %t %4b %8s %n\n")
  343. X
  344. X
  345. X
  346. XTech Notes:
  347. X
  348. X    o  This version of "ls" was compiled/assembled using Lattice v5.05, with
  349. X       optimization on.  See the Makefile and Linkfile for details.  Also
  350. X       note that to use the source level debugger "cpr", you need to use one
  351. X       of the commented out CFLAG strings in the Makefile with -d3, as well
  352. X       as uncommenting the ADDSYM statement in the Linkfile.
  353. X
  354. X    o  The file "mycres.o" is included, as I couldn't get "mycres.a" to
  355. X       assemble ... no includes called "exec/funcdef.i" anywhere I could find,
  356. X       etc.  I didn't have a real reason to muck with that code, so I didn't
  357. X       pursue the matter.  The "mycres.o" file is from the v3.1 distribution,
  358. X       and works fine (except when you try using getenv() ...).
  359. X
  360. X    o  My enhancements to "ls" have evolved bit-by-bit over a period of about
  361. X       a year.    Consequently, the code is somewhat less than "pristine".  I'm
  362. X       sure it can be cleaned up a bit, though I tried to keep my changes from
  363. X       getting too ugly.  Also, I've tried to more or less stay with Justin's
  364. X       coding style, but I know that hasn't been completely successful either.
  365. X       Anyway, you've been warned;  if you go reading the code, send flames
  366. X       to /dev/null ... :-)
  367. X
  368. X
  369. X
  370. XRevision History:
  371. X
  372. X    Kim E. DeVaughn
  373. X
  374. X    v4.0k  May 11, 1990  Pretty much completely revised the output formats.
  375. X             Much more like UNIX's "ls" in its output, options,
  376. X             etc.  Several bugs fixed.  Many new options.
  377. X
  378. X    Justin V. McCormick
  379. X
  380. X    v3.1  July 29, 1989  Bug fixes, new output width and height options.
  381. X    v3.0  July 25, 1989  Instant sorting, best-fit output, new features.
  382. X    v2.2  December 1988  Fixed status return and multiple wildcard pathnames.
  383. X    v2.1  December 1988  Minor size reduction, fixed a few bugs from 2.0.
  384. X    v2.0  November 1988  Revised for Lattice 5.0 and made 1.3 compatible.
  385. X    v1.0    August 1986  Written from scratch, my first Amiga project.
  386. X
  387. X
  388. X
  389. XAcknowledgements, Etc:
  390. X
  391. XFirst, let me thank Justin McCormick for providing "ls" v3.1, and the very
  392. Xgood algorithms from which I was able to build upon.  His inline sorting in
  393. Xparticular made his version the one I chose to enhance because of it's speed.
  394. X
  395. XA very excellent job, and my sincere thanks go to him for a job well done!
  396. X
  397. XSecond, let me thank Tom Rokicki for the "date" algorithm I used, and to
  398. XRob Peck for publishing it in his excellent book, "Programmer's Guide to the
  399. XAmiga" (Sybex).  Both of these people have contributed much to the Amiga
  400. Xdevelopment community!
  401. X
  402. XThird, I want to thank Matt Dillon for providing his fine DME editor, and
  403. Xmany, *many* examples of how to program the Amiga.  If you ever need to know
  404. Xhow to do something, take a look a Matt's code ... chances are he's done it,
  405. Xand in a lean, mean, fast way!
  406. X
  407. X
  408. XFinally, I want to mention that this version of "ls" is copyrighted, whereas
  409. XJustin's previous versions were explicitly "public domain".  Specifically, I
  410. Xam copyrighting this version of the executable "ls", the "ls.c" and "ls.h"
  411. Xsource files, and the "ls.doc" and "README" files.
  412. X
  413. XThis is completely legal, since the base version I used had been declared to
  414. Xbe in the "public domain".  I feel totally justified in doing so due to the
  415. Xextensive changes that I've made.
  416. X
  417. XYou'll note, if you read the "License", that I'm not trying to restrict the
  418. Xuse or redistribution of this version of "ls", other than to insure that it
  419. Xisn't used by anyone to make money out of, myself included.  In particular,
  420. Xcertain "diskzines" seem to be unscrupulously "raiding" the freely redistrib-
  421. Xutable software base lately, in an attempt to help sell their disk/magazines.
  422. X
  423. XMost of the ones I've seen are *trash*, and the prices they charge are a bit
  424. Xoutrageous, considering what they provide.  I do not wish to help them.  Not
  425. Xeven in a slight way.
  426. X
  427. XAnyway, I hope nobody has a big problem with this.  If you do, lemee hear
  428. Xfrom you.
  429. X
  430. X
  431. X
  432. XThe Future:
  433. X
  434. XThere will definitely be at least one more release of my version of "ls".  It
  435. Xwill address those items mentioned in the "What's Not Done" and "Known Bugs"
  436. Xsections above.  In particular, it will support AmigaOS 2.0's enhancements,
  437. Xsuch as links.    Given 2.0's probable availability, I doubt this will happen
  438. Xmuch before the end of 1990.  We shall see.
  439. X
  440. XIn the meantime, let me hear from you if there are things you like (or don't).
  441. XAnd especially if you find any bugs, "features", or anomalies.  And if (God
  442. Xforbid), there's a useful option I've managed to overlook, don't hesitate to
  443. Xput in a request ... there are still a few option flags left ... :-)
  444. X
  445. XIn addition to my electronic addresses (see signature below), I can be
  446. Xreached at:
  447. X
  448. X    Kim E. DeVaughn
  449. X    750 Sylvan Av,  #32
  450. X    Mt. View, CA  94041
  451. X
  452. XHowever, email to my USENET/UUCP address is probably the surest way to get
  453. Xin touch with me, and should be used if at all possible.
  454. X
  455. X
  456. X/kim   /\oo/\
  457. X
  458. X--
  459. XUUCP:  kim@uts.amdahl.com
  460. X  or:  {sun,decwrl,hplabs,pyramid,uunet,oliveb,ames}!amdahl!kim
  461. XDDD:   408-746-8462
  462. XUSPS:  Amdahl Corp.  M/S 249,  1250 E. Arques Av,  Sunnyvale, CA 94086
  463. XBIX:   kdevaughn     GEnie:   K.DEVAUGHN     CIS:   76535,25
  464. END_OF_FILE
  465. if test 15901 -ne `wc -c <'README'`; then
  466.     echo shar: \"'README'\" unpacked with wrong size!
  467. fi
  468. # end of 'README'
  469. fi
  470. if test -f 'README.1ST' -a "${1}" != "-c" ; then 
  471.   echo shar: Will not clobber existing file \"'README.1ST'\"
  472. else
  473. echo shar: Extracting \"'README.1ST'\" \(1204 characters\)
  474. sed "s/^X//" >'README.1ST' <<'END_OF_FILE'
  475. XIn case the "p" (pure) bit got stripped off in the archiving/dearchiving
  476. Xprocess ... yes, ls v4.0k is "residentable".  Just use the Protect command
  477. X(or chmod, etc) to turn it back on, and you can "resident" it.
  478. X
  479. XSee the README for known limitations, bugs, etc.  One WARNING upfront ... if
  480. Xthe shell you're using expands normal wildcards (* and ?) itself, you'll need
  481. Xto use the shell's quoting mechanism for "ls" to work as intended.  If you
  482. Xlet the shell expand wildcards for you, the output can be somewhat "strange".
  483. XSee the README for why this is the way it is (for now).
  484. X
  485. XA quick plea to shell writers ... *please* provide a mechanism for semi-
  486. Xautomatically disabling wildcard expansion is your shells!  One easy way to
  487. Xdo this is to not expand the wildcards until an actual command (not an
  488. Xalias) that will use the filelist is to be executed.  Then one could define
  489. Xan alias something like: "alias  xls 'set nowild;ls;unset nowild'", and have
  490. Xthe expansion controlled on a command-by-command basis.  Even better if you
  491. Xcan issue commands as part of the "prompting" function, as "unset nowild"
  492. Xwould work better there (in case the user ^C'd out of the command proper).
  493. X
  494. XEnjoy ...!
  495. X
  496. X/kim   06/05/90
  497. END_OF_FILE
  498. if test 1204 -ne `wc -c <'README.1ST'`; then
  499.     echo shar: \"'README.1ST'\" unpacked with wrong size!
  500. fi
  501. # end of 'README.1ST'
  502. fi
  503. if test -f 'ls.doc' -a "${1}" != "-c" ; then 
  504.   echo shar: Will not clobber existing file \"'ls.doc'\"
  505. else
  506. echo shar: Extracting \"'ls.doc'\" \(20124 characters\)
  507. sed "s/^X//" >'ls.doc' <<'END_OF_FILE'
  508. X
  509. X     LS(1)                        AmigaOS 1.3                    LS(1)
  510. X
  511. X
  512. X     NAME
  513. X      ls - list contents of directory
  514. X
  515. X
  516. X     SYNOPSIS
  517. X      ls [ [ -options <args> ] [ names ] ] ...
  518. X
  519. X
  520. X     DESCRIPTION
  521. X      For each directory name argument, ls lists the contents of the
  522. X      directory; for each file name argument (non-wildcarded), ls
  523. X      lists the entry using the long listing format.  If wildcards
  524. X      (* or ?) are passed to ls, it internally expands the filespec
  525. X      into a list of names, and lists them in the requested format
  526. X      (short, long, or single column).
  527. X
  528. X      The output is sorted alphabetically, by default, and the short
  529. X      format listing is used unless the argument name is a "fully named
  530. X      path" (i.e., one without wildcards), or an option flag requests a
  531. X      different format.
  532. X
  533. X      When no argument is given, the current directory is listed.  When
  534. X      several arguments are given, the arguments are processeed in the
  535. X      order presented, with "non-sticky" option flags being reset to the
  536. X      default value between arguments.  Option flags may preceed the
  537. X      individual name arguments.
  538. X
  539. X      There are three major listing formats.  The default format is to
  540. X      list the entries in a short, columnar format, with entries sorted
  541. X      down the columns.  The long and single column (one entry per line)
  542. X      formats are enabled with various options.
  543. X
  544. X      For the short format, ls reads the size of the current window to
  545. X      determine the character positions available on one line, and the
  546. X      number of lines available without scrolling.    If this information
  547. X      cannot be obtained, ls assumes 77 columns by 23 lines.  A builtin
  548. X      "pager" is available by default when the short format is used.
  549. X
  550. X      The output formats and applicable option switches are designed to
  551. X      emulate the UNIX(R) equivalent as closely as possible.
  552. X
  553. X      The options are as follows:
  554. X
  555. X           -a   Lists entries including those whose names begin with a
  556. X            dot (.)  These are not listed by default.
  557. X
  558. X           -b   Normally, the long format listing shows the total number
  559. X            of blocks used by an entry (including the File Header
  560. X            and Extension blocks).  This option limits the block
  561. X            count to the number of Data Blocks only.
  562. X
  563. X           -c   Shows the comment/filenote for an entry, if any.  The
  564. X            comment is shown enclosed in quote marks on a line
  565. X            beneath the entry.    This option implies the long format
  566. X            listing.
  567. X
  568. X           -d   Show only entries that are directories.
  569. X
  570. X           -e   By default, ls shows the "execute" attribute bit in the
  571. X            long format listing as an "x".  This option changes that
  572. X            to an "e".  [sticky]
  573. X
  574. X           -f   Show only entries that are files (i.e., not directories).
  575. X
  576. X           -h   Lists entries including those whose "hidden" attribute
  577. X            bit is set.  These are not listed by default.
  578. X
  579. X           -i   Lists entries including those whose names end with the
  580. X            string ".info".  These are not listed by default.
  581. X
  582. X           -k   The output listing is sorted by the disk "key" value of
  583. X            the entries.  [sticky]
  584. X
  585. X           -l   Lists in long format, giving the entrys' attribute bits,
  586. X            comment present flag, disk key (if -k or -K specified),
  587. X            size in blocks, size in bytes, date, and name.
  588. X
  589. X           -m   Lists entries with the case "mixed".  Normally, the case
  590. X            of entry names is respected when sorting.
  591. X
  592. X           -n   No sorting of entries is performed.  Entries are listed
  593. X            the order in which they are Examined by the system.
  594. X
  595. X           -o   Use the old ls version (v3.1) long format when a long
  596. X            listing is requested.  Note: this option does not cause
  597. X            a long listing by itself, but only specifies that the
  598. X            old format be used, should a long listing be requested
  599. X            (see notes below).
  600. X
  601. X           -p   Puts a slash (/) after each entry name if that entry is
  602. X            a directory.
  603. X
  604. X           -q   Normally, ls will continue to process name arguments
  605. X            until the argument list is exhausted.  This option will
  606. X            cause ls to terminate when an entry is not found.  (This
  607. X            option only has meaning for "fully named path" args).
  608. X
  609. X           -r   Reverses the sort order to get reverse alphabetic, oldest,
  610. X            smallest, or highest key first as appropriate.
  611. X
  612. X           -s   Sort by size, with largest first.  [sticky]
  613. X
  614. X           -t   Sort by date, with newest first.  [sticky]
  615. X
  616. X           -u   Display a short usage summary, showing syntax and options.
  617. X
  618. X           -v   Use variable column widths in the short format listing.
  619. X            Normally, ls bases the column widths on the longest name
  620. X            in the directory, and uses that value for all columns.
  621. X            This option allows each column's width to be determined
  622. X            by the longest name in the column itself.
  623. X
  624. X           -x pat
  625. X            Excludes entries matching the pattern "pat" from the
  626. X            listing.  The pattern string may contain "*" and "?",
  627. X            which are interpreted as wildcards with the usual meaning.
  628. X            [sticky]
  629. X
  630. X           -z   Overrides the calculation of the block counts, and shows
  631. X            the value found in the filesystem's NumBlocks entry.
  632. X            This option is useful for getting an indication of a
  633. X            file's current block size if the file is being written to,
  634. X            or if the file resides on a psuedo-device (such as a
  635. X            "pathass" assign) that has no inherent bytes/block value.
  636. X            Note: the block count reported should only be used as an
  637. X            indicator, as it may not be exact.
  638. X
  639. X           -A   Lists all entries.    This option is equivalent to using
  640. X            the a, h, and i options together.  Note: entries matching
  641. X            the exclude pattern (-x) are not listed.
  642. X
  643. X           -B size
  644. X            Normally, ls computes an entry's block count using the
  645. X            bytes/block value appropriate for the filesystem or
  646. X            device on which the entries reside (currently 512 for the
  647. X            FFS, and 488 for the OFS).    This option allows that value
  648. X            to be specified directly, which can be useful to determine
  649. X            if an entry or entries will "fit" on a device which has a
  650. X            different bytes/block value.  In such usage, the "size"
  651. X            of the target device would be specified by the option's
  652. X            argument, and the block count obtained then compared to
  653. X            the number of blocks available on the target device (with
  654. X            Info, for example).  [sticky]
  655. X
  656. X           -C   Single column (one entry per line) output format.  Note:
  657. X            this usage of "-C" is exactly opposite UNIX's usage.
  658. X
  659. X           -D   Normally, files and directories are intermixed in the
  660. X            output listings.  With this option, all directories will
  661. X            appear seperately, and last in the listing.
  662. X
  663. X           -E   Normally, ANSI escape codes are used to highlight names
  664. X            of directory entries and comments.    This option disables
  665. X            such highlighting.    Note: ANSI escape codes are normally
  666. X            automatically disabled when the ls output is redirected
  667. X            to stdout or is piped.  [sticky]
  668. X
  669. X           -F <format>
  670. X            Allows the specification of the output format when the
  671. X            old long format is used.  This option implies -l and -o
  672. X            (see notes below).
  673. X
  674. X           -G   Disables the subdirectory-by-subdirectory summary totals
  675. X            normally provided when the long format listing is used.
  676. X
  677. X           -H   Disables printing of the subdirectory name header line
  678. X            normally provided for other than the current directory.
  679. X
  680. X           -I   Normally, when using the short format, if the number of
  681. X            entries is larger than can be displayed in the window ls
  682. X            is using, a builtin "pager" is invoked to prevent the
  683. X            list from scrolling.  This option (as well as output re-
  684. X            direction or pipeing) inhibits the pager.
  685. X
  686. X           -K   Display disk "keys" in the long format listing.  Normally,
  687. X            they are not shown.  This option implies the long format.
  688. X
  689. X           -Ln  Recursively lists subdirectories encountered, with depth
  690. X            limited to "n" levels.  A depth of n = 1 lists only the
  691. X            current directory.
  692. X
  693. X           -M   Ignore alphabetic case when matching directory contents
  694. X            with wildcard patterns.  Normally, the case of names is
  695. X            respected.    This option applies to both name arguments,
  696. X            and exclude (-x) patterns.
  697. X
  698. X           -N name
  699. X            Show only entries that are newer than entry "name".
  700. X            "Name" cannot be wildcarded.
  701. X
  702. X           -O name
  703. X            Show only entries that are older than entry "name".
  704. X            "Name" cannot be wildcarded.
  705. X
  706. X           -P   Show entry names as full (absolute) path names.  This
  707. X            option implies the long format.
  708. X
  709. X           -Q   Normally, ls disables the system requesters that pop up
  710. X            when a device is empty, etc, and presents an error msg.
  711. X            This option turns them on again.  [sticky]
  712. X
  713. X           -R   Recursively lists subdirectories encountered.
  714. X
  715. X           -S   Normally, files and directories are intermixed in the
  716. X            output listings.  With this option, all directories will
  717. X            appear seperately, and first in the listing.
  718. X
  719. X           -T   Provides a grand total of all files and directories, and
  720. X            their sizes, for all entries processed.  This option is
  721. X            valid with all formats.  Note: the seperate totalization
  722. X            line will not be printed, if the information is simply a
  723. X            duplication (as it would be for just a long format list
  724. X            of the current directory).
  725. X
  726. X           -V   Show entry names as relative (to the current directory)
  727. X            path names.  This option implies the long format.
  728. X
  729. X           -W   Normally, when a "wildcarded match" occurs on a directory
  730. X            entry, its contents are listed.  This option prevents the
  731. X            contents from being listed.  Only the directory name will
  732. X            be printed.
  733. X
  734. X           -X width
  735. X            Forces the short format to use "width" for the number of
  736. X            columns available in ls's window.  [sticky]
  737. X
  738. X           -Y height
  739. X            Forces the short format to use "height" for the number of
  740. X            lines available in ls's window.  [sticky]
  741. X
  742. X           -Z   Forces output of ANSI escape sequences for highlighting,
  743. X            even though the ls output may be redirected to stdout, or
  744. X            piped.  See also, -E.  [sticky]
  745. X
  746. X           -0 thru
  747. X           -6   Specifies the format to be used for the date in the long
  748. X            listing (not applicable to the -o long format).  [sticky]
  749. X
  750. X            Available formats are:
  751. X               0: age to years:  mmm  d hh:mm  aging to  mmm dd  yyyy
  752. X               1: full:      mmm dd yyyy  hh:mm:ss
  753. X               2: dash alpha:     dd-mmm-yy hh:mm:ss
  754. X               3: dash numeric:  mm-dd-yy hh:mm:ss
  755. X               4: slash:     mm/dd/yy hh:mm:ss
  756. X               5: european:     dd/mm/yy hh:mm:ss
  757. X               6: dot:         yy.mm.dd hh:mm:ss
  758. X
  759. X            Format 0 is the default, and is the format used by UNIX.
  760. X            The "aging" period is 180 days, and the day may be either
  761. X            one or two digits, as required.
  762. X
  763. X           -?   Synonym for "-u".  Displays a short usage summary.
  764. X
  765. X           -    Forces the next argument to be interpreted as a name.
  766. X            This is useful for specifying entries whose names begin
  767. X            with the "-" character.
  768. X
  769. X
  770. X      The attribute bits printed in the default long format consist of a
  771. X      nine character string.  Each position contains a letter if the
  772. X      attribute it represents is "true", or a "-" otherwise.  If all
  773. X      attributes were to apply to a single entry, the string would appear
  774. X      as "dhsparwxd", where:
  775. X
  776. X         d    indicates the entry is a directory
  777. X         h    indicates the entry is a hidden entry
  778. X         s    indicates the entry is a script file
  779. X         p    indicates the entry is a pure executable (residentable)
  780. X         a    indicates the entry has been archived, and not modified since
  781. X         r    indicates the entry is readable
  782. X         w    indicates the entry is writable
  783. X         x    indicates the entry is executable (or "e" with the -e option)
  784. X         d    indicates the entry is deletable
  785. X
  786. X      It should be noted that AmigaOS 1.3 includes only marginal support
  787. X      of the attribute bits, and enforces few of them.  The above however
  788. X      is their formal definition.  Also, "directory" is not an attribute
  789. X      bit, but is included in the attribute string.  Further, a "c" flag
  790. X      will appear to the right of the attribute string should an entry
  791. X      have an associated comment/filenote (or a blank if not).
  792. X
  793. X      AmigaOS makes provisions for additional attributes, some of which
  794. X      may be application specific.    Should any of these be set, ls will
  795. X      display a "+" instead of a "-" in the hidden attribute position,
  796. X      or an "H" if the hidden attribute itself also applies.
  797. X
  798. X
  799. X      The ls -l (default long list) command prints its output as follows:
  800. X
  801. X           --sa-rw-d c   136    65383  May    5 18:15  fubar
  802. X
  803. X      This horizontal configuration provides a good deal of information.
  804. X      From right to left, you see that the current directory holds one
  805. X      file, named "fubar".  It was created (or at least last modified) at
  806. X      6:15 P.M. on May 5th.  It contains 65,383 bytes, and occupies 136
  807. X      blocks on the device where it is located (including the file header
  808. X      block, and any extension blocks).  There is a comment associated
  809. X      with the file, and it is (supposedly) a script file that has been
  810. X      archived, and may be read, written, and deleted.
  811. X
  812. X
  813. X     EXAMPLES
  814. X           ls -a
  815. X
  816. X      This command prints the names of all files in the current directory,
  817. X      including those that begin with a dot (.), which normally are not
  818. X      printed.  The short format is used.
  819. X
  820. X
  821. X           ls -cAKP1
  822. X
  823. X      This command provides you with a maximum amount of information on
  824. X      all files in the current directory, including those that normally
  825. X      do not print (A), associated comments, if any (c), the disk key
  826. X      numbers (K), the full path name (P), and the full date format (1).
  827. X      A long format listing is implied (both c and P).
  828. X
  829. X
  830. X           ls -ARTB488
  831. X
  832. X      This command prints the names of all files in the current directory
  833. X      (A), and all subdirectories below it (R), with a grand total of the
  834. X      counts and sizes at the end (T).  Block counts are computed as if
  835. X      the files were located on an OFS (Old File System) device (B488),
  836. X      and the short format is used.
  837. X
  838. X      If the files were actually located on an FFS (Fast File System)
  839. X      device, such as a hard disk partition, comparing the grand total of
  840. X      the block counts to the available blocks on an OFS floppy (with say,
  841. X      Info) would tell you if the tree would fit on the floppy.
  842. X
  843. X
  844. X           ls -hrtX50 -Y 15 -Tx*zoo
  845. X
  846. X      This command prints a short format listing of the current directory,
  847. X      including hidden files (h), sorted by date (t), with oldest files
  848. X      first (r).  The output "window" is restricted to 50 columns (X50),
  849. X      by 15 lines (Y 15).  A totalization of all entries is requested (T),
  850. X      and entries ending with the string "zoo" will be excluded (x*zoo).
  851. X
  852. X
  853. X           ls -lN df0:emily.c -sOdf1:lynn.c df0:*.c
  854. X
  855. X      This command prints a long format listing (l) of all files ending
  856. X      with the string ".c" on df0: that are newer than "df0:emily.c"
  857. X      (N df0:emily.c), but are older than "df1:lynn.c" (Odf1:lynn.c).
  858. X      The listing will be sorted by size, with largest files first (s).
  859. X
  860. X
  861. X     NOTES
  862. X      Wildcards:
  863. X      ----------
  864. X      Normal wildcards may be used in file names and in the last level of
  865. X      a directory path name.  The "*" character is used to match any
  866. X      number of characters (including zero), and a "?" matches any single
  867. X      character.  Wildcards may also be used in specifying an exclusion
  868. X      pattern (-x).
  869. X
  870. X      If the shell that is used to invoke ls expands the wildcards itself,
  871. X      they MUST be quoted in some manner for ls to work as intended.
  872. X      Some common shell quoting methods are:  "*" or \* or '*   See your
  873. X      shell documentation for details.
  874. X
  875. X
  876. X      Options:
  877. X      --------
  878. X      Option flags may be given in any order.  Where options conflict,
  879. X      such as specifying both -s and -t, the last option encountered is
  880. X      the one used.
  881. X
  882. X      Option flags may be given grouped or seperately.  E.g., "-lsR" is
  883. X      logically the same as "-l -s -R".
  884. X
  885. X      Options requiring an argument, such as -x or -B, must be the last
  886. X      option in a group, or given seperately, and must be immediately
  887. X      followed by the argument (with or without seperating blanks).  The
  888. X      forms:  "-ltB488",  "-ltB 488",  "-lt -B488",  and "-l -B   488 -t"
  889. X      are all correct, and logically the same.  The form "-lB488t" is
  890. X      NOT correct, and will result in unspecified behavior.
  891. X
  892. X      Options are normally reset to their default state between name
  893. X      arguments.  Some flags however, apply to all name arguments, and
  894. X      are identified as "sticky" in the option descriptions above.
  895. X
  896. X
  897. X      Pathnames:
  898. X      ----------
  899. X      A pathname with spaces in it like "Wombat Soup", must be surrounded
  900. X      by quotes.  Up to 30 seperate pathname patterns can be processed by
  901. X      ls per command.
  902. X
  903. X
  904. X      Aborting:
  905. X      ---------
  906. X      ls may be aborted at any time by issuing a control-C (assuming the
  907. X      invoking shell passes ^C's along to the applications).  ls will
  908. X      print the string "**BREAK" and then terminate when this occurs.
  909. X
  910. X
  911. X      Formatted Output:
  912. X      -----------------
  913. X      For customized output, there is a special option that expects a
  914. X      format rule as the next argument:
  915. X
  916. X      -F <format>
  917. X           Format output with <format), using the following symbols:
  918. X          %p  print the attribute bits
  919. X          %d  print the date: yy-mm-dd
  920. X          %t  print the time: hh-mm-ss
  921. X          %b  print the number of blocks used by the entry
  922. X          %s  print the number of bytes  used by the entry
  923. X          %n  print the name of the entry
  924. X          %%  print a percent symbol
  925. X          \n  print a linefeed
  926. X          \t  print a tab
  927. X          \\  print a backslash symbol
  928. X
  929. X           The default format rule that ls uses for old format long
  930. X           listings is:  -F "%p %d %t %4b %8s %n\n".   Note that a format
  931. X           specification that contains spaces must be quoted.
  932. X
  933. X           Any of the format options that begin with the '%' symbol can
  934. X           have an optional pad count that lets you specify how many
  935. X           columns to use.    For example:  -F "%40n\n"  would print each
  936. X           entry name right justified in a field of 40 columns.
  937. X
  938. X           The attribute bits in this format are as described above, with
  939. X           one exception: the first position is used to indicate that the
  940. X           entry has an associated comment.  If so, a "c" is used (else a
  941. X           "-").
  942. X
  943. X           You can use this feature of ls to help create simple batch
  944. X           command files.  For example, the command:
  945. X
  946. X          ls -PF "copy %n RAM:\n" df0:*.h
  947. X
  948. X           tells ls to perform a listing using full pathnames with a
  949. X           special format, matching only filenames that end with ".h" in
  950. X           directory df0:.    Suppose df0: has the following files in it:
  951. X
  952. X          joe.h  fred.h  pete.h  ted.h
  953. X
  954. X           The example ls command would result in the following list of
  955. X           commands:
  956. X
  957. X          copy df0:fred.h RAM:
  958. X          copy df0:joe.h RAM:
  959. X          copy df0:pete.h RAM:
  960. X          copy df0:ted.h RAM:
  961. X
  962. X           A script file from this by redirecting the output of ls to a
  963. X           temporary file:
  964. X
  965. X          ls >ram:templist -PF "copy %n RAM:\n" df0:*.h
  966. X          execute ram:templist      ; do the script,
  967. X          delete ram:templist      ;    and delete it
  968. X
  969. X
  970. X      Tip:
  971. X      ----
  972. X      To list files older or newer than a certain date, rather than a
  973. X      certain file, you can do this:
  974. X
  975. X           echo >RAM:datemark "Marker"    ; create a temp file in RAM:
  976. X           setdate RAM:datemark 07-Jul-89 ; set datestamp for temp file
  977. X           ls -N ram:datemark df0:          ; list files newer than "datemark"
  978. X           delete ram:datemark          ; remove temp file
  979. X
  980. X
  981. X     CAVEATS/BUGS
  982. X      Refer to the README file accompanying this distribution for notes
  983. X      of any currently known bugs or limitations.
  984. X
  985. X
  986. X     AUTHORS
  987. X      Justin V. McCormick is the author of the of ls (v3.1), and other
  988. X      earlier revisions.  Version 3.1 was used as a base on which to
  989. X      develop the current revision (v4.0k), because of its excellent
  990. X      "inline" sorting and its columnation algorithms, as well as its
  991. X      small size, and fast code.
  992. X
  993. X      Kim E. DeVaughn provided the numerous enhancements, fixes, etc, to
  994. X      bring v3.1 up to the current v4.0k.
  995. X
  996. X
  997. X     COPYRIGHT
  998. X      ls v4.0k is (c) Copyright 1990, Kim E. DeVaughn, all rights
  999. X      reserved.  See the "License" accompanying this distribution for
  1000. X      limitations, and other details.
  1001. X
  1002. X      UNIX is a registered trademark of AT&T.  They had nothing to do
  1003. X      with any of this code, but did provide the "model" for some of its
  1004. X      output formats and options.
  1005. END_OF_FILE
  1006. if test 20124 -ne `wc -c <'ls.doc'`; then
  1007.     echo shar: \"'ls.doc'\" unpacked with wrong size!
  1008. fi
  1009. # end of 'ls.doc'
  1010. fi
  1011. if test ! -d 'src' ; then
  1012.     echo shar: Creating directory \"'src'\"
  1013.     mkdir 'src'
  1014. fi
  1015. if test -f 'src/Linkfile' -a "${1}" != "-c" ; then 
  1016.   echo shar: Will not clobber existing file \"'src/Linkfile'\"
  1017. else
  1018. echo shar: Extracting \"'src/Linkfile'\" \(457 characters\)
  1019. sed "s/^X//" >'src/Linkfile' <<'END_OF_FILE'
  1020. X;Link with file for LS by Justin V. McCormick 89-07-25
  1021. X;Stubs out lots of unused things that Lattice 5.0 dragged in
  1022. XDEFINE @write=@nullstub
  1023. XDEFINE @_dwrite=@nullstub
  1024. XDEFINE @_dseek=@nullstub
  1025. XDEFINE @_dclose=@nullstub
  1026. XDEFINE @CXBRK=@nullstub
  1027. XFROM
  1028. X;lat:lib/cres.o
  1029. Xmycres.o
  1030. Xls.o
  1031. Xlssup.o
  1032. XTO ls-new
  1033. XLIB lib:lcr.lib lib:amiga.lib
  1034. XSC SD
  1035. XND
  1036. X;Uncomment ADDSYM below for debugging with "cpr"
  1037. X;ADDSYM
  1038. X;VERBOSE
  1039. X;MAP link.map F H L S X PLAIN WIDTH 84 HEIGHT 0 SWIDTH 20
  1040. END_OF_FILE
  1041. if test 457 -ne `wc -c <'src/Linkfile'`; then
  1042.     echo shar: \"'src/Linkfile'\" unpacked with wrong size!
  1043. fi
  1044. # end of 'src/Linkfile'
  1045. fi
  1046. if test -f 'src/Makefile' -a "${1}" != "-c" ; then 
  1047.   echo shar: Will not clobber existing file \"'src/Makefile'\"
  1048. else
  1049. echo shar: Extracting \"'src/Makefile'\" \(590 characters\)
  1050. sed "s/^X//" >'src/Makefile' <<'END_OF_FILE'
  1051. X# -------------------------------------------------
  1052. X# ls 2.3 Makefile by Justin V. McCormick 89-07-05
  1053. X#    Modified for v4.0k by Kim E. DeVaughn - 05/11/90
  1054. X# -------------------------------------------------
  1055. X#CFLAGS = -cfmtu -d1 -m0 -rr -v
  1056. X#CFLAGS = -cfmtu -d3 -m0 -rr -v
  1057. X#CFLAGS = -cfmtu -d3 -m0 -rr -v -O
  1058. XCFLAGS = -cfmtu -d1 -m0 -rr -v -O
  1059. XAFLAGS = -u
  1060. X
  1061. XOBJS = mycres.o ls.o lssup.o
  1062. X
  1063. X# rename "ls-new" to "ls" before installation (this avoids conflicts when testing a new version)
  1064. XDEST = ls-new
  1065. X
  1066. X$(DEST): $(OBJS)
  1067. X     blink with Linkfile
  1068. X
  1069. Xlssup.o: lssup.a
  1070. X     asm $(AFLAGS) lssup.a
  1071. X
  1072. Xls.c:     ls.h
  1073. END_OF_FILE
  1074. if test 590 -ne `wc -c <'src/Makefile'`; then
  1075.     echo shar: \"'src/Makefile'\" unpacked with wrong size!
  1076. fi
  1077. # end of 'src/Makefile'
  1078. fi
  1079. if test -f 'src/ls.h' -a "${1}" != "-c" ; then 
  1080.   echo shar: Will not clobber existing file \"'src/ls.h'\"
  1081. else
  1082. echo shar: Extracting \"'src/ls.h'\" \(3685 characters\)
  1083. sed "s/^X//" >'src/ls.h' <<'END_OF_FILE'
  1084. X/*
  1085. X * ls.h - header file for a UNIX-like directory utility
  1086. X *
  1087. X * ls v4.0k is (c) Copyright 1990, Kim E. DeVaughn, all rights reserved.
  1088. X *
  1089. X */
  1090. X
  1091. X/* Prevent Lint from complaining about ANSI prototype extensions */
  1092. X#ifdef _lint
  1093. X
  1094. X#define __asm
  1095. X#define __stdargs
  1096. X#define __regargs
  1097. X#define R_D0
  1098. X#define R_D1
  1099. X#define R_A0
  1100. X
  1101. X#else
  1102. X
  1103. X#define R_D0    register __d0
  1104. X#define R_D1    register __d1
  1105. X#define R_A0    register __a0
  1106. X
  1107. X#endif
  1108. X
  1109. X/* Use Real strlen unless you comment out the following */
  1110. X#define strlen strlen
  1111. X
  1112. X#include <dos.h>
  1113. X#include <libraries/dosextens.h>
  1114. X
  1115. X/*lint -save    */
  1116. X/*lint -library */
  1117. X#include <stdio.h>
  1118. X#include <string.h>
  1119. X#include <stdlib.h>
  1120. X#include <signal.h>
  1121. X#include <proto/exec.h>
  1122. X#include <proto/dos.h>
  1123. X/*lint -restore */
  1124. X
  1125. Xextern int tolower (char);
  1126. X
  1127. X#define MEMF_PUBLIC (1L << 0)
  1128. X#define MEMF_CHIP   (1L << 1)
  1129. X#define MEMF_FAST   (1L << 2)
  1130. X#define MEMF_CLEAR  (1L << 16)
  1131. X
  1132. X#define SUPPRESS_ERR_REQ (void *)-1L
  1133. X
  1134. X/* usage defines ... error codes eventually reported to the OS as DOS #120's */
  1135. X#define SYNTAX         0L
  1136. X#define ILLEGAL_ARG  120000L
  1137. X#define MISSING_ARG  120010L
  1138. X#define PATTERN_ERR  120020L
  1139. X#define WILDSPEC_ERR 120030L
  1140. X
  1141. X/* Structure used to hold file info in a linked list */
  1142. Xstruct FibEntry
  1143. X{
  1144. X  struct MinNode fe_Node;
  1145. X  struct FileInfoBlock *fe_Fib;
  1146. X};
  1147. X
  1148. Xtypedef struct FileInfoBlock FIB;
  1149. Xtypedef struct FileLock      FLK;
  1150. Xtypedef struct InfoData      ID;
  1151. X
  1152. X#define  MAX_BLKS_PER_EXTENT  72
  1153. X
  1154. X/* Maximum number of command line args, buffer sizes, etc. */
  1155. X#define MAXARG         32
  1156. X#define MAXDEPTH  0x7fffffff
  1157. X#define MAXFNLEN     30
  1158. X#define PADTABSIZE  100
  1159. X#define WORKSIZE    300
  1160. X
  1161. X/* Flag bits for LSFlags and LSFlagsX */
  1162. X#define BREAKFLAG    (1L << 0)
  1163. X#define CONSOLE     (1L << 1)
  1164. X#define SHOWDIRS    (1L << 2)
  1165. X#define SHOWFILES    (1L << 3)
  1166. X#define LISTALL     (1L << 4)
  1167. X#define LONGLIST    (1L << 5)
  1168. X#define NOSORTFLAG    (1L << 6)
  1169. X#define NOTEFLAG    (1L << 7)
  1170. X#define PATHNAMED    (1L << 8)
  1171. X#define REVFLAG     (1L << 9)
  1172. X#define WILDPATH    (1L << 10)
  1173. X#define FULLPATHNAMES    (1L << 11)
  1174. X#define ANTIMATCH    (1L << 12)
  1175. X#define TOTALIZE    (1L << 13)
  1176. X#define NOHEADERS    (1L << 14)
  1177. X#define NOINTERACT    (1L << 15)
  1178. X#define FILESFIRST    (1L << 16)
  1179. X#define SEPFILESDIRS    (1L << 17)
  1180. X#define SHOWOLDERTHAN    (1L << 18)
  1181. X#define SHOWNEWERTHAN    (1L << 19)
  1182. X#define IGNORECASELIST    (1L << 20)
  1183. X#define IGNORECASEWILD    (1L << 21)
  1184. X#define MATCHDOTFILES    (1L << 22)
  1185. X#define MATCHINFOFILES    (1L << 23)
  1186. X#define SHOWHIDDEN    (1L << 24)
  1187. X#define OLDLONGFORMAT    (1L << 25)
  1188. X#define VARCOLSFORMAT    (1L << 26)
  1189. X#define ONECOLFORMAT    (1L << 27)
  1190. X#define ADDDIRSLASH    (1L << 28)
  1191. X#define SHOWDISKKEYS    (1L << 29)
  1192. X#define RELPATHNAMES    (1L << 30)
  1193. X#define NODIRTOTAL    (1L << 31)
  1194. X#define WILDPATHFLAG    (1L << 32 - 32)
  1195. X#define SINGLEFILEFLAG    (1L << 33 - 32)
  1196. X#define DATABLKSONLY    (1L << 34 - 32)
  1197. X#define NOWILDPATHDIRS    (1L << 35 - 32)
  1198. X#define EMPTYDIRFLAG    (1L << 36 - 32)
  1199. X#define NOTFOUNDHALT    (1L << 37 - 32)
  1200. X#define NOFIXNUMBLOCKS    (1L << 38 - 32)
  1201. X
  1202. X
  1203. X/* defines for datestr()   */
  1204. X
  1205. X#define  TIME_YEAR_THRESHOLD  180   /*    days for  AGE_TO_YEARS    format    */
  1206. X                    /*    change -----v    d = space or D    */
  1207. X#define  AGE_TO_YEARS    0    /*   MMM dD HH:MM   or     MMM dD  YYYY    */
  1208. X#define  FULL_FORM    1    /*   MMM DD YYYY  HH:MM:SS        */
  1209. X#define  DASHA_FORM    2    /*   DD-MMM-YY HH:MM:SS         */
  1210. X#define  DASHN_FORM    3    /*   MM-DD-YY HH:MM:SS            */
  1211. X#define  SLASH_FORM    4    /*   MM/DD/YY HH:MM:SS            */
  1212. X#define  EURO_FORM    5    /*   DD/MM/YY HH:MM:SS            */
  1213. X#define  DOT_FORM    6    /*   YY.MM.DD HH:MM:SS            */
  1214. X
  1215. X
  1216. X/* defines for attrstr()    */
  1217. X
  1218. X#define  FIBB_HIDDEN    7   /*    not in 1.3 includes, but works with Protect  */
  1219. X#define  FIBF_HIDDEN    (1 << FIBB_HIDDEN)
  1220. X
  1221. X#define  FIBF_RESERVED    ~(FIBF_HIDDEN  | FIBF_SCRIPT | FIBF_PURE  |   \
  1222. X              FIBF_ARCHIVE | FIBF_READ   | FIBF_WRITE |   \
  1223. X              FIBF_EXECUTE | FIBF_DELETE)
  1224. END_OF_FILE
  1225. if test 3685 -ne `wc -c <'src/ls.h'`; then
  1226.     echo shar: \"'src/ls.h'\" unpacked with wrong size!
  1227. fi
  1228. # end of 'src/ls.h'
  1229. fi
  1230. if test -f 'src/mycres.a' -a "${1}" != "-c" ; then 
  1231.   echo shar: Will not clobber existing file \"'src/mycres.a'\"
  1232. else
  1233. echo shar: Extracting \"'src/mycres.a'\" \(5160 characters\)
  1234. sed "s/^X//" >'src/mycres.a' <<'END_OF_FILE'
  1235. X* mycres.a - Specialized C initial startup procedure under AmigaDOS
  1236. X* Adapted for LS use from c.a by Justin V. McCormick 89-05-12
  1237. X* Converted to CAPE 89-06-03
  1238. X*
  1239. X    IFD    CAPE            ; Special OP flags for CAPE
  1240. X
  1241. X    CSYMFMT
  1242. X    BASEREG    B
  1243. X    SMALLOBJ
  1244. X    OPTIMON
  1245. X    ADDSYM
  1246. X    include "work:ipre.i"        ; A precompiled collection of the below...
  1247. X
  1248. X    ELSE
  1249. X
  1250. X    INCLUDE    "exec/types.i"
  1251. X    INCLUDE    "exec/alerts.i"
  1252. X    INCLUDE    "exec/nodes.i"
  1253. X    INCLUDE    "exec/lists.i"
  1254. X    INCLUDE    "exec/ports.i"
  1255. X    INCLUDE    "exec/libraries.i"
  1256. X    INCLUDE    "exec/tasks.i"
  1257. X    INCLUDE    "exec/memory.i"
  1258. X    INCLUDE    "exec/execbase.i"
  1259. X    INCLUDE    "libraries/dos.i"
  1260. X    INCLUDE    "libraries/dosextens.i"
  1261. X    INCLUDE    "workbench/startup.i"
  1262. X    INCLUDE    "exec/funcdef.i"
  1263. X    INCLUDE    "exec/exec_lib.i"
  1264. X    INCLUDE    "libraries/dos_lib.i"
  1265. X
  1266. X    ENDC
  1267. X
  1268. X    
  1269. XMEMFLAGS    EQU    MEMF_CLEAR+MEMF_PUBLIC
  1270. X
  1271. X; some usefull macros:
  1272. X
  1273. XSYS    MACRO    *
  1274. X    IFGT    NARG-2
  1275. X    FAIL    !!!
  1276. X    ENDC
  1277. X    IFEQ    NARG-2
  1278. X    MOVE.L    \2,a6
  1279. X    ENDC
  1280. X    JSR    _LVO\1(a6)
  1281. X    ENDM
  1282. X    
  1283. X    XDEF    XCEXIT            ; exit(code) is standard way to leave C.
  1284. X    XDEF    @XCEXIT
  1285. X
  1286. X    XREF    @myalloc
  1287. X    XREF    @myfree
  1288. X    XREF    @astrncpy        ; String copy routine
  1289. X    XREF    DOSBase
  1290. X    XREF    LinkerDB        ; linker defined base value
  1291. X    XREF    NEWDATAL
  1292. X    XREF    RESBASE
  1293. X    XREF    RESLEN
  1294. X    XREF    _BSSBAS            ; linker defined base of BSS
  1295. X    XREF    _BSSLEN            ; linker defined length of BSS
  1296. X    XREF    @_main            ; Name of C program to start with.
  1297. X;    XREF    @MemCleanup        ; Free all allocated memory
  1298. X
  1299. X    SECTION    CODE
  1300. X* --------------------------------------------------------------------- *
  1301. Xstart:
  1302. X    move.l    a0,a2            ; save command pointer
  1303. X    move.l    d0,d2            ; and command length
  1304. X    lea    LinkerDB,a4        ; load base register
  1305. X
  1306. X    movem.l    d0-d1/a0-a2,-(sp)
  1307. X    sub.l    #RESBASE,a4
  1308. X    move.l    #RESLEN,d0
  1309. X    move.l    #MEMFLAGS,d1
  1310. X    SYS    AllocMem,4
  1311. X    tst.l    d0
  1312. X     bne    1$
  1313. X    movem.l    (sp)+,d0-d1/a0-a2
  1314. X    rts
  1315. X    
  1316. X1$
  1317. X    move.l    d0,a0
  1318. X    move.l    d0,a2
  1319. X
  1320. X; a2 now has difference
  1321. X    move.l    d0,a1
  1322. X    move.l    #NEWDATAL,d0
  1323. X; copy data over
  1324. Xcpy:
  1325. X    move.l    (a4)+,(a0)+
  1326. X    subq.l    #1,d0
  1327. X    bne    cpy
  1328. X; a4 now points at number of relocs
  1329. X    move.l    (a4)+,d0
  1330. Xreloc:
  1331. X     beq.s    nreloc
  1332. X    move.l    a1,a0
  1333. X    add.l    (a4)+,a0        ; a0 now has add of reloc
  1334. X    add.l    (a0),a2
  1335. X    move.l    a2,(a0) 
  1336. X    move.l    a1,a2            ; restore offset
  1337. X    subq.l    #1,d0
  1338. X    bra    reloc
  1339. X
  1340. Xnreloc:
  1341. X     move.l    a1,A4            ; set up new base register
  1342. X    add.l    #RESBASE,A4
  1343. X    movem.l    (sp)+,d0-d1/a0-a2
  1344. X
  1345. X    movea.l    4,a6
  1346. X    move.l    a6,SysBase(A4)
  1347. X    move.l    sp,_StackPtr(A4)    ; Save stack ptr
  1348. X
  1349. X; get the address of our task
  1350. X    move.l    ThisTask(a6),a3
  1351. X
  1352. X; clear any pending signals
  1353. X    moveq    #0,d0
  1354. X    move.l    #$00003000,d1
  1355. X    SYS    SetSignal
  1356. X    
  1357. X; are we running as a son of Workbench?
  1358. X    tst.l    pr_CLI(a3)
  1359. X     bne.s    fromCLI
  1360. X
  1361. X* --------------------------------------------------------------------- *
  1362. X* Workbench Startup Code
  1363. XfromWorkbench:
  1364. X; wait for a message from our starter
  1365. X    lea    pr_MsgPort(a3),a0    ; our process base
  1366. X    SYS    WaitPort
  1367. X    lea    pr_MsgPort(a3),a0    ; our process base
  1368. X    SYS    GetMsg
  1369. X    move.l    d0,d2
  1370. X     beq.w    exitToDOS
  1371. X
  1372. X; return the startup message to our parent
  1373. X; we forbid so workbench can't UnLoadSeg() us
  1374. X; before we are done:
  1375. X    SYS    Forbid
  1376. X    movea.l    d2,a1
  1377. X    SYS    ReplyMsg
  1378. X    bra.w    exitToDOS
  1379. X
  1380. X* --------------------------------------------------------------------- *
  1381. X* CLI Startup Code
  1382. X; Entry: d2 = command length
  1383. X;     a2 = Command pointer
  1384. XfromCLI:
  1385. X; attempt to open DOS library:
  1386. X    lea    DOSName(PC),a1
  1387. X    moveq    #0,d0
  1388. X    SYS    OpenLibrary
  1389. X    move.l    d0,DOSBase(A4)
  1390. X     bne.s    1$
  1391. X    moveq    #100,d0
  1392. X    bra.s    exit2
  1393. X1$
  1394. X; find command name:
  1395. X    move.l    pr_CLI(a3),a3
  1396. X    add.l    a3,a3            ; bcpl pointer conversion
  1397. X    add.l    a3,a3
  1398. X    move.l    cli_CommandName(a3),a3
  1399. X    add.l    a3,a3            ; bcpl pointer conversion
  1400. X    add.l    a3,a3
  1401. X
  1402. X; collect parameters:
  1403. X    move.l    d2,d0            ; get command line length
  1404. X    moveq.l #0,d1
  1405. X    move.b    (a3)+,d1
  1406. X    add.l    d1,d0            ; add length of command name
  1407. X    addq.l    #1,d0            ; allow for space after command 
  1408. X    jsr    @myalloc        ; allocate enough space for whole cmd line
  1409. X    tst.l    d0
  1410. X     beq.s    closeDOS        ; Oops, allocate failed
  1411. X    move.l    d0,_CmdLine(A4)
  1412. X
  1413. X; copy command name into allocated space
  1414. X    movea.l    a3,a1
  1415. X    movea.l    d0,a0
  1416. X    moveq    #0,d0
  1417. X    move.b    -1(a3),d0
  1418. X    jsr    @astrncpy
  1419. X
  1420. X; insert a space unless command itself is the only argument
  1421. X    cmpi.w    #2,d2
  1422. X     bcs.s    2$
  1423. X    move.b    #' ',(a0)+
  1424. X    
  1425. X; Append/copy command line into allocated space
  1426. X    move.l    d2,d0
  1427. X    movea.l    a2,a1
  1428. X    jsr    @astrncpy
  1429. X2$
  1430. X    movea.l    _CmdLine(A4),a0        ; push command line address
  1431. X
  1432. X* --------------------------------------------------------------------- *
  1433. X* Call @_main
  1434. Xmain:
  1435. X    jsr    @_main            ; call C entrypoint
  1436. X    moveq.l #0,d0            ; set successful status
  1437. X    bra.s    exit2
  1438. XXCEXIT:
  1439. X    move.l    4(sp),d0        ; extract exit return code
  1440. X@XCEXIT:
  1441. Xexit2:
  1442. X    move.l    d0,-(sp)        ; Save exit return status
  1443. X
  1444. X    movea.l    _CmdLine(A4),a0
  1445. X    jsr    @myfree            ; Free command line
  1446. X
  1447. X;    jsr    @MemCleanup        ; Free malloced resources
  1448. X
  1449. XcloseDOS:
  1450. X; Close the DOS library
  1451. X    move.l    DOSBase(A4),a1
  1452. X    SYS    CloseLibrary,4        ; close Dos library
  1453. X
  1454. X; this rts sends us back to DOS:
  1455. XexitToDOS:
  1456. X    move.l    #RESLEN,d0
  1457. X    movea.l    A4,a1
  1458. X    suba.l    #RESBASE,a1
  1459. X    move.l    (sp)+,d7        ; Grab exit return code
  1460. X    movea.l _StackPtr(A4),sp    ; restore stack ptr
  1461. X    SYS    FreeMem,4
  1462. X    move.l    d7,d0            ; Put exit return code in d0
  1463. X    rts
  1464. X
  1465. X*-----------------------------------------------------------------------
  1466. XDOSName    dc.b    'dos.library',0
  1467. X
  1468. X
  1469. X    SECTION _MERGED,BSS
  1470. X* --------------------------------------------------------------------- *
  1471. X    XDEF    _CmdLine
  1472. X    XDEF    SysBase
  1473. X    XDEF    _StackPtr
  1474. X_CmdLine:
  1475. X    ds.b    4
  1476. XSysBase:
  1477. X    ds.b    4
  1478. X_StackPtr
  1479. X    ds.b    4
  1480. X    END
  1481. END_OF_FILE
  1482. if test 5160 -ne `wc -c <'src/mycres.a'`; then
  1483.     echo shar: \"'src/mycres.a'\" unpacked with wrong size!
  1484. fi
  1485. # end of 'src/mycres.a'
  1486. fi
  1487. if test -f 'src/mycres.o.uu' -a "${1}" != "-c" ; then 
  1488.   echo shar: Will not clobber existing file \"'src/mycres.o.uu'\"
  1489. else
  1490. echo shar: Extracting \"'src/mycres.o.uu'\" \(1583 characters\)
  1491. sed "s/^X//" >'src/mycres.o.uu' <<'END_OF_FILE'
  1492. Xbegin 644 mycres.o
  1493. XM```#YP````````/H`````E]#3T1%```````#Z0```%@D2"0`2?D`````2.?`6
  1494. XMX)G\`````"`\`````"(\``$``2QX``1.KO\Z2H!F```(3-\'`TYU($`D0")`D
  1495. XM(#P`````(-Q3@&;Z(!QG#B!)T=S5T""*)$E3@&#P*$G9_`````!,WP<#+'@`0
  1496. XM!"E.```I3P``)FX!%'``(CP``#``3J[^SDJK`*QF)$'K`%Q.KOZ`0>L`7$ZN3
  1497. XM_HPD`&<``)I.KO]\(D).KOZ&8```C$/Z`*AP`$ZN_=@I0```9@1P9&!>)FL`2
  1498. XMK-?+U\LF:P`0U\O7RR`"<@`2&]"!4H!.N0````!*@&=&*4```")+($!P`!`K8
  1499. XM__].N0`````,0@`"90X0_``@(`(B2DZY`````"!L``!.N0````!P`&`$("\`_
  1500. XM!"\`(&P``$ZY`````")L```L>``$3J[^8B`\`````"),D_P`````+A\N;```8
  1501. XM+'@`!$ZN_RX@!TYU9&]S+FQI8G)A<GD````#[X$```)?4D530D%310````,``
  1502. XM```0````7````3Z!```"0&UY9G)E90`````!```!)($```-`87-T<FYC<'D`4
  1503. XM```````"````\@```0:!```"0%]M86EN```````!```!$($```)?4D533$5._
  1504. XM``````(````6```!-H$```-?3&EN:V5R1$(````````!````!H$```-?3D57Q
  1505. XM1$%404P````````!````/($```)`;7EA;&QO8P````$```#:A@```E]$3U-"!
  1506. XM87-E`````@```+8```$JA@```E]3>7-"87-E`````0```&J&```#7U]3=&%CZ
  1507. XM:U!T<@```````@```&X```%&A@```U]?0VUD3&EN90````````,```#D```!C
  1508. XM#````2`!```"0%A#15A)5`````$<`0```E]80T58250````!&`````````/PE
  1509. XM`````E]$3U-.86UE```!5`````)?9G)O;4-,20```*H````"7W-T87)T````#
  1510. XM`````````D!80T58250````!'`````)?;6%I;@```````0X````"7VYR96QO*
  1511. XM8P````!8`````U]E>&ET5&]$3U,``````30````"7V5X:70R``````$<````?
  1512. XM`E]80T58250````!&`````1?9G)O;5=O<FMB96YC:```````A@````-?8VQOO
  1513. XM<V5$3U,```````$H`````5]C<'D```!``````E]R96QO8P``````2```````1
  1514. XM``/R```#Z`````)?7TU%4D=%1````^L````#```#[P$```)?4WES0F%S90``3
  1515. XM``0!```#7U]3=&%C:U!T<@``````"`$```-?7T-M9$QI;F4`````````````8
  1516. XM`````_`````"7U-Y<T)A<V4````$`````U]?4W1A8VM0='(```````@````#*
  1517. X87U]#;61,:6YE``````````````````/R/
  1518. X``
  1519. Xend
  1520. Xsize 1104
  1521. END_OF_FILE
  1522. if test 1583 -ne `wc -c <'src/mycres.o.uu'`; then
  1523.     echo shar: \"'src/mycres.o.uu'\" unpacked with wrong size!
  1524. fi
  1525. # end of 'src/mycres.o.uu'
  1526. fi
  1527. echo shar: End of archive 1 \(of 4\).
  1528. cp /dev/null ark1isdone
  1529. MISSING=""
  1530. for I in 1 2 3 4 ; do
  1531.     if test ! -f ark${I}isdone ; then
  1532.     MISSING="${MISSING} ${I}"
  1533.     fi
  1534. done
  1535. if test "${MISSING}" = "" ; then
  1536.     echo You have unpacked all 4 archives.
  1537.     rm -f ark[1-9]isdone
  1538. else
  1539.     echo You still need to unpack the following archives:
  1540.     echo "        " ${MISSING}
  1541. fi
  1542. ##  End of shell archive.
  1543. exit 0
  1544. -- 
  1545. Mail submissions (sources or binaries) to <amiga@cs.odu.edu>.
  1546. Mail comments to the moderator at <amiga-request@cs.odu.edu>.
  1547. Post requests for sources, and general discussion to comp.sys.amiga.
  1548.